<template>
    <view class="adt-com">
        <view class="adt-i adl">
            <mx-banner :info="{
                height: 500,
                border_radius: 10,
                list: info.list
            }"></mx-banner>
        </view>
        <view class="adt-i adr flex flex-direction justify-between">
            <view class="ri" v-for="(item, index) in info.adlist" :key="index" @click="go(item)">
                <image class="adimg" :src="$imgUrl + item.img"></image>
            </view>
        </view>
    </view>
</template>

<script setup>
const {proxy} = getCurrentInstance()
const props = defineProps({
    info: {
        type: Object,
        default: {}
    }
})

function go(item) {
    let u = item.url || item.link
    proxy.$go(u)
}
</script>

<style lang="scss" scoped>
.adt-com {
    width: 100%;
    height: auto;
    padding: 0 20rpx;
    display: flex;
    align-items: center;
    .adt-i {
        flex: 1;
        height: 500rpx;
    }
    .adl {
        padding-right: 10rpx;
    }
    .adr {
        padding-left: 10rpx;
        .ri {
            width: 100%;
            height: 240rpx;
            .adimg {
                width: 100%;
                height: 100%;
                border-radius: 10rpx;
            }
        }
    }
}
</style>